package ltd.hxya.novel.admin.controller;


import ltd.hxya.novel.admin.entity.Operation;
import ltd.hxya.novel.admin.service.IOperationService;
import ltd.hxya.novel.admin.vo.OperationVo;
import ltd.hxya.novel.common.bean.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hty
 * @since 2022-10-04
 */
@RestController
@RequestMapping("/admin/operation")
public class OperationController {

    @Autowired
    private IOperationService operationService;

    //查询出菜单的三级分类
    @GetMapping("/getMenu")
    public Result<List<OperationVo>> operationTree(){
        List<OperationVo> operations = operationService.operationTree();
        return Result.success(operations);
    }

}
